package com.itgaoshu.mapper;


import com.itgaoshu.bean.Report;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;


public interface ReportMapper extends Mapper<Report> {
//挂号类的增删改查
    //查询排号表的方法
    @Select("select * from report")
    public List<Report> listReport();

    //添加排号表的方法
    @Insert("insert into Report VALUES (null,reportname=#{reportname},sex=#{sex},age=#{age},department=#{department},doctor=#{doctor}," +
            "reporttype=#{reporttype},price=#{price},time=curdate( ),users=#{users},state='0',phone=#{phone},carid=#{carid} ")
    int addreport(Report report);

    //删除排号表的方法
    @Delete("delete from report where reportid=#{reportid}")
    int deletereportbyid(int reportid);
}